package com.example;

import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

@Service
public class MyObjectFactoryBean implements FactoryBean<Object> , InitializingBean {

    private int factoryId;
    private int toolId;
    @Override
    public Object getObject() {
        Object myObject = new Object();
        return myObject;
    }

    @Override
    public Class<?> getObjectType() {
        return Object.class;
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("");
    }

    public void setFactoryId(int factoryId) {
        this.factoryId = factoryId;
    }

    public void setToolId(int toolId) {
        this.toolId = toolId;
    }
}